package zmwxapplet

import (
	"github.com/gin-gonic/gin"
	"yundian/internel/app/dao"
	"yundian/internel/app/models/prices"
	"yundian/internel/pkg/dingo"
	. "yundian/internel/pkg/dingo/result"
)

func HandleGetPriceDetail(c *gin.Context) {
	param := &struct {
		ProductId string `json:"productId"`
	}{}
	dingo.ErrorIf(c.Bind(param)).Unwrap()

	Response(c)("", CodeSuccess, dao.NewPricesDao().GetPriceDetail(param.ProductId).Unwrap().(*prices.PriceModel))(OK)
}
